package com.ray.bean;

import com.ray.util.StringUtil;

import lombok.Getter;
import lombok.Setter;

/**
 * 订单明细
 * @author Shensg
 * 2018年2月27日
 */
@Getter
@Setter
public class OrderInfoDetailBean {
	private Integer id;//id
	private String  orderNo;//订单编号
	private String  lineNo;//序号
	private String  orderTotal;//订单数
	private String  feedTotal;//投料数
	private String  feedTotalFu;//投料数(付)
	private Integer feedingCount;//整形投料数  nate
	//投料单投料数(20181115 libin)
	private Double feedCount;
	//序号替换映射
	private String sequeueNo;
	
	private String  materialFactory;//默认仓库
	private String  materialType;//物料类型
	private String  materialCode;//物料代码
	private String  materialModel;//物料规格
	private String  color;//色号
	private String  colorDescription;//色号描述
	private String  shortTotal;//可短出数
	private String  shortSetter;//短出设置人
	//新增 
	private String mtlktTotal;//每条料可开数
	private String klfsWay;//开料方式
	private String yltsTotal;//用料条数
	private String klccSize;//开料尺寸
	private String smallOrderTotal;//每列订单数
	private String smallFeedTotal;//每列投料数
	//例外
	private String company;//公司
	private String rowIndex;//行号
	
	//客户型号
	private String articleNo;
	//客户订单编号
	private String articleOrderNo;
	//物料名称
	private String materialName;
	//供应商名称
	private String providerName;
	//供方编号
	private String providerNo;
	//申请修改ID
	private String applyId;
	/**
	 * 新增属性,物料单位 unit物料单价 unitPrice by 李斌 at 2018-04-29 
	 */
	private String unit;
	private Double unitPrice;
	private Integer isEquals;//计价单位是否等同于生产单位
	
	//新增属性,是否已生成投料单 at 2018-05-09 by 李斌
	private String isBuild;
	//拼料颜色
	private String plys;
	//业务单
	//SKU号
	private String skuNo;
	//单只条码贴
	private String singleCode;
	//内盒商品标识贴
	private String nhspCode;
	//外箱商品标识贴
	private String wxspCode;
	//客户PO号
	private String custPoNo;
	//说明备注
	private String remark;
	//镜片材质
	private String glassesType;
	//透光率
	private String lightTrans;
	//位置
	private String location;
	//颜色（不同颜色描述）
	private String otherColor;
	//内容
	private String content;
	//尺寸
	private String size;
	//材质
	private String qualityType;
	//字体
	private String font;
	//工艺
	private String arts;
	//点漆色
	private String dqs;
	private String tys;
	
	//新增属性 公司订单编号 李斌
	private String companyOrderId;
	//新增属性 是否读取颜色 李斌
	private int isReadColor;  
	//新增属性 生产单位可领数量 李斌
	private double productionUnitFeedCount;
	//新增属性 是否是操作人员添加 0 否 1是。删除的时候不删除1
	private Integer isOpraterAdd;
	//新增属性 订单的操作类型(删除,更新)
	private Integer type;
	//操作记录
	private String specialRemark;
	//是否有用料条数
	private Integer haveYltsTotal;
	//工厂型号
	private String factoryNo;
	//客户型号
	private String customerNo;
	//订单编号
	private String orderId;
	//客户
	private String customer;
	//交货日期
	private String deliveryDate;
	//大货时间
	private String dhDate;
	//大货数量
	private String dhTotal;
	//印字色
	private String yzs;
	//下单日期
	private String orderDate;
	
	//物料可用数量
	private Double availableCount;
	//20190515
	private Double singleFeedCount;//单付投料数
	private Double actualFeedCount;//实际投料数
	private Integer useFactoryId;//使用车间
	private Double useFactoryCount;//使用车间数量
	//20190528
	private Integer materialDeptId;
	private String  materialDeptName;
	private String  classification;//分类
	
	
	
	@Override
	public String toString() {
		return "OrderInfoDetailBean [id=" + id + ", orderNo=" + orderNo + ", lineNo=" + lineNo + ", orderTotal="
				+ orderTotal + ", feedTotal=" + feedTotal + ", sequeueNo=" + sequeueNo + ", materialFactory="
				+ materialFactory + ", materialType=" + materialType + ", materialCode=" + materialCode
				+ ", materialModel=" + materialModel + ", color=" + color + ", colorDescription=" + colorDescription
				+ ", shortTotal=" + shortTotal + ", shortSetter=" + shortSetter + ", mtlktTotal=" + mtlktTotal
				+ ", klfsWay=" + klfsWay + ", yltsTotal=" + yltsTotal + ", klccSize=" + klccSize + ", smallOrderTotal="
				+ smallOrderTotal + ", smallFeedTotal=" + smallFeedTotal + ", company=" + company + ", rowIndex="
				+ rowIndex + ", articleNo=" + articleNo + ", articleOrderNo=" + articleOrderNo + ", materialName="
				+ materialName + ", providerName=" + providerName + ", applyId=" + applyId + ", unit=" + unit
				+ ", unitPrice=" + unitPrice + ", isEquals=" + isEquals + ", isBuild=" + isBuild + ", plys=" + plys
				+ ", skuNo=" + skuNo + ", singleCode=" + singleCode + ", nhspCode=" + nhspCode + ", wxspCode="
				+ wxspCode + ", custPoNo=" + custPoNo + ", remark=" + remark + ", glassesType=" + glassesType
				+ ", lightTrans=" + lightTrans + ", location=" + location + ", otherColor=" + otherColor + ", content="
				+ content + ", size=" + size + ", qualityType=" + qualityType + ", font=" + font + ", arts=" + arts
				+ ", getArticleNo()=" + getArticleNo() + ", getId()=" + getId() + ", getOrderNo()=" + getOrderNo()
				+ ", getLineNo()=" + getLineNo() + ", getOrderTotal()=" + getOrderTotal() + ", getFeedTotal()="
				+ getFeedTotal() + ", getMaterialFactory()=" + getMaterialFactory() + ", getMaterialType()="
				+ getMaterialType() + ", getMaterialCode()=" + getMaterialCode() + ", getMaterialModel()="
				+ getMaterialModel() + ", getColor()=" + getColor() + ", getColorDescription()=" + getColorDescription()
				+ ", getShortTotal()=" + getShortTotal() + ", getShortSetter()=" + getShortSetter() + ", getCompany()="
				+ getCompany() + ", getMtlktTotal()=" + getMtlktTotal() + ", getKlfsWay()=" + getKlfsWay()
				+ ", getYltsTotal()=" + getYltsTotal() + ", getKlccSize()=" + getKlccSize() + ", getSmallOrderTotal()="
				+ getSmallOrderTotal() + ", getSmallFeedTotal()=" + getSmallFeedTotal() + ", getRowIndex()="
				+ getRowIndex() + ", getSequeueNo()=" + getSequeueNo() + ", getIsEquals()=" + getIsEquals()
				+ ", getArticleOrderNo()=" + getArticleOrderNo() + ", getMaterialName()=" + getMaterialName()
				+ ", getApplyId()=" + getApplyId() + ", getProviderName()=" + getProviderName() + ", getUnit()="
				+ getUnit() + ", getIsBuild()=" + getIsBuild() + ", getPlys()=" + getPlys() + ", getUnitPrice()="
				+ getUnitPrice() + ", getSkuNo()=" + getSkuNo() + ", getSingleCode()=" + getSingleCode()
				+ ", getNhspCode()=" + getNhspCode() + ", getWxspCode()=" + getWxspCode() + ", getCustPoNo()="
				+ getCustPoNo() + ", getRemark()=" + getRemark() + ", getGlassesType()=" + getGlassesType()
				+ ", getLightTrans()=" + getLightTrans() + ", getLocation()=" + getLocation() + ", getOtherColor()="
				+ getOtherColor() + ", getContent()=" + getContent() + ", getSize()=" + getSize()
				+ ", getQualityType()=" + getQualityType() + ", getFont()=" + getFont() + ", getArts()=" + getArts()
				+ ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString()
				+ "]";
	}
	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof OrderInfoDetailBean)) {
			return false;
		}
		OrderInfoDetailBean oid = (OrderInfoDetailBean) obj;
		//如果原物料代码是空的
		if(oid.getMaterialCode()==null || "".equals(oid.getMaterialCode().trim())) {
			return false;
		}
		return StringUtil.checkEqu(oid.getOrderNo(), this.getOrderNo())
				&& StringUtil.checkEqu(oid.getMaterialCode(), this.getMaterialCode())
				&& StringUtil.checkEqu(oid.getOrderTotal(), this.getOrderTotal())
				&& StringUtil.checkEqu(oid.getYltsTotal(), this.getYltsTotal())
				&& StringUtil.checkEqu(oid.getFeedTotal(), this.getFeedTotal())
				&& StringUtil.checkEqu(oid.getColorDescription(), this.getColorDescription());
	}
}
